#!/usr/bin/perl -w
use strict;
my %freqs;

while(<>){
  chomp;
  my $word = (split /\s+/, $_)[3];
  if($freqs{$word}){
    $freqs{$word}++;
  }
  else{
    $freqs{$word} = 1;
  }
}

foreach my $key (sort(keys(%freqs))){
  printf("%s -> %s\n", $key, $freqs{$key});
}
